//
//  InformationThreeCell.m
//  meiyinxiang
//
//  Created by lizidi on 2018/1/18.
//  Copyright © 2018年 hbjApple. All rights reserved.
//

#import "InformationThreeCell.h"

@interface InformationThreeCell()

@property(nonatomic,strong)UILabel * labelone;

@end

@implementation InformationThreeCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        if (!_labelone) {
            _labelone = [[UILabel alloc] init];
            _labelone.text = @"标签";
            _labelone.font = [MyAdapter lfontADapter:15];
            [self addSubview:_labelone];
            [_labelone mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.offset([MyAdapter laDapter:20]);
                make.centerY.equalTo(self.contentView.mas_centerY);
                make.height.offset([MyAdapter laDapter:20]);
                make.width.offset([MyAdapter laDapter:40]);
            }];
        }
        
        if (!_biaoLabel) {
            _biaoLabel = [[UILabel alloc]initWithFrame:CGRectZero];
            [self.contentView addSubview:_biaoLabel];
            [_biaoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(_biaoLabel.mas_right).offset([MyAdapter laDapter:26]);
                make.top.offset([MyAdapter laDapter:10]);
                make.right.offset([MyAdapter laDapter:-15]);
                make.height.offset([MyAdapter laDapter:30]);
            }];
        }
        if (!_tagsView) {
            _tagsView = [[HXTagsView alloc] initWithFrame:CGRectMake([MyAdapter laDapter:103], self.biaoLabel.frame.origin.y+self.biaoLabel.frame.size.height+10, self.contentView.frame.size.width, 0)];
            
            [self.contentView addSubview:_tagsView];
        }
        
        
    }
    
    return self;
}

-(void)setMYXotheruserinfoM:(MYXotheruserinfoModel *)MYXotheruserinfoM{
    
    if([MYXotheruserinfoM.tags isEqualToString:@""]) {
        _biaoLabel.hidden = YES;
        _tagsView.hidden = YES;
    }else{
        NSArray * array = [[NSArray alloc]init];
        array = [MYXotheruserinfoM.tags componentsSeparatedByString:@","];
        NSString * str = [NSString stringWithFormat:@"%@",array];
        NSLog(@"%@",str);
        _tagsView.type = 1;
        [_tagsView setTagAry:array delegate:self];
    }
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end

